<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<title><fmt:message key="accountMenu.addressManager"/></title>
<content tag="position">
	<fmt:message key="accountMenu.personInfo" /> &gt; <b><fmt:message key="account.personalInfo.addressList" /></b>
</content>

<form id="form1" name="form1" method="post" action="">
	<div class="address_filter">
		<p>
			<fmt:message key="address.help.1" />
			<fmt:message key="address.help.2" />
			<a href="csEditAddress.html?doAction=add"><fmt:message key="address.help.add" /></a>
		</p>
		<ins></ins>
	</div>
	<div class="one_tab">
		<div class="tab_05">
			<ul class="content clearfix">
				<li class="curr"><span><fmt:message key="address.list.title" /></span></li>
			</ul>
		</div>
	</div>
	<div class="list_order">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_order">
			<tr>
				<th width="10%"><fmt:message key="address.contactor" /></th>
				<th width="15%"><fmt:message key="address.email" /></th>
				<th width="15%"><fmt:message key="address.telephone" /></th>
				<th ><fmt:message key="address.address" /></th>
				<th width="10%"><fmt:message key="address.isDefault"/></th>
				<th width="10%"><fmt:message key="wishlist.op.manage"/></th>
			</tr>
			<c:forEach var="address" items="${addressList}" varStatus="status">
				<c:set var="class" value="class='even'" />
				<c:if test="${0 == status.index%2}" ><c:set var="class" value="class='odd'" /></c:if>
				<tr ${class}>
					<td><c:out value="${address.firstname} ${address.lastname}" /></td>
					<td>${address.email}</td>
					<td>${address.telephone}</td>
					<td><common:displayString length="26" value="${address.regionFullName}&nbsp;${address.address}"/></td>
					<td>
						<c:if test="${address.isDefault}">
							<input name="radio" type="radio" id="radio" checked="checked" />
						</c:if>
						<c:if test="${not address.isDefault}">
							<input name="radio" type="radio" id="radio" onclick="cs.address.defaultAd('${address.addressId }')" />
						</c:if>
					</td>
					<td>
						<a href="csEditAddress.html?doAction=edit&addressId=${address.addressId}"><fmt:message key="address.button.modify" /></a>
						<a href="#" onclick="cs.address.deleteAdd('${address.addressId }')"><fmt:message key="address.button.delete" /></a>
					</td>
				</tr>
			</c:forEach>
			<c:if test="${empty addressList}">
			<tr><td colspan="6"><fmt:message key="tables.noItemsDisplay" /></td></tr>
			</c:if>
		</table>
	</div>				
</form>